Skip to content

Backend/enh/added-flag-for-api-forwarding#1399

Open
H-C-21 wants to merge 1 commit into
mainfrom
backend/enh/added-flag-for-runInMasterCloud
Open

Backend/enh/added-flag-for-api-forwarding#1399
H-C-21 wants to merge 1 commit into
mainfrom
backend/enh/added-flag-for-runInMasterCloud

Conversation

@H-C-21

@H-C-21 H-C-21 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved cloud request routing so forwarding occurs only when a valid, specified target cloud is provided and differs from the current cloud.
    • Requests without a target cloud now remain on the local handling path.
    • Forwarding now more consistently uses the proxy configuration when available, and otherwise reliably falls back to direct handling.
  • Tests
    • Updated integration coverage to reflect the new forwarded-request routing behavior.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03d69222-f48f-4e50-ae35-d4ed85fcb9b4

📥 Commits

Reviewing files that changed from the base of the PR and between 436da5a and a6cac14.

📒 Files selected for processing (2)
  • lib/mobility-core/src/Kernel/External/MasterCloudForward.hs
  • lib/mobility-core/test-integration/Main.hs
🚧 Files skipped from review as they are similar to previous changes (2)
  • lib/mobility-core/test-integration/Main.hs
  • lib/mobility-core/src/Kernel/External/MasterCloudForward.hs

Walkthrough

Adds shouldForwardToCloud and changes runThroughMasterCloud to decide forwarding from current and target CloudType values, using lookupCloudType plus master proxy settings. The integration test updates its forwarded-path invocation to pass Just AWS.

Changes

Cloud-based forwarding logic

Layer / File(s) Summary
Predicate and exports
lib/mobility-core/src/Kernel/External/MasterCloudForward.hs
Exports shouldForwardToCloud, adds CloudType/lookupCloudType imports, and defines the predicate that forwards only for a distinct, non-UNAVAILABLE target cloud.
Forwarding path and test call site
lib/mobility-core/src/Kernel/External/MasterCloudForward.hs, lib/mobility-core/test-integration/Main.hs
Changes runThroughMasterCloud to take Maybe CloudType, consult lookupCloudType, and choose between interpretWithForwarder and direct L.callAPI'; updates the integration test call to pass Just AWS.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hopped through clouded air,
With Just AWS sent here and there.
No stray True flags to steer the way,
The clouds now choose the path today.
Thump! 🐇☁️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly related to the main change: API forwarding logic was updated to use a flag-like decision path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backend/enh/added-flag-for-runInMasterCloud

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot requested a review from sidsethu July 3, 2026 12:59
@sidsethu sidsethu force-pushed the backend/enh/added-flag-for-runInMasterCloud branch from 436da5a to a6cac14 Compare July 6, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants